{include file="admin/header.tpl" title="header" }


<div id="content"> {php} echo display_msg(); {/php}
  <div class="error" id="main_error_div" style="display:none;"></div>
  
  {if !isset($post.expense_id) }
  <h2>Add Expense</h2>
  <div class="lstable2">
    <form method="post" >
      <input type="hidden" name="action" id="action" value="{$post.action}">
      <table width="60%" border="0" cellspacing="0" cellpadding="4">
        <tr>
          <td width="30%" align="left" valign="middle"><strong>Expense Nombre : <span class="mandatory">*</span></strong></td>
          <td width="60%" align="left" valign="middle">
          	<input maxlength="255" type="text" name="expense_name" id="expense_name" style="width:150px" /> 
          </td>
          <td width="10%">&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td  colspan="2" align="left"><input name="submit" class="btncss" type="submit" value="Save" />
            &nbsp;
            <input class="btncss" type="button" onclick="location.href='{$baseurl}/admin/expense.php'" value="Cancel" /></td>
        </tr>
      </table>
    </form>
  </div>
  {else}
   <h2>Edit Expense</h2>
  <div class="lstable2">
    <form method="post" >
      <input type="hidden" name="action" id="action" value="edit">
      <input type="hidden" name="expense_id" id="expense_id" value="{$expense.expense_id}">
      <table width="60%" border="0" cellspacing="0" cellpadding="4">
       
       
      <tr>
          <td width="30%" align="left" valign="middle"><strong>Expense Nombre : <span class="mandatory">*</span></strong></td>
          <td width="50%" align="left" valign="middle">
          	<input maxlength="255" type="text" name="expense_name" value="{$expense.expense_name}" id="expense_name" style="width:150px" /> 
          </td>
          <td width="10%">&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td  colspan="2" align="left"><input name="submit" class="btncss" type="submit" value="Save" />
            &nbsp;
            <input class="btncss" type="button" onclick="location.href='{$baseurl}/admin/expense.php'" value="Cancel" /></td>
        </tr>
      </table>
    </form>
  </div>
  			
        
         <script language="javascript">
			current_day = '{$smarty.now|date_format:"%d"}';
			current_month = '{$smarty.now|date_format:"%m"}';
			current_year = '{$smarty.now|date_format:"%Y"}';
		 {literal}
                  $('#sale_date').datepicker({minDate: new Date(1970, 1 - 1, 26),
			maxDate: new Date(current_year, current_month - 1, current_day)});
		{/literal}	
        </script>
  		 
  
  {/if} 
  </div>
{include file="admin/footer.tpl" title="footer"} 